<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>:disable</title>
        <link type="text/css" rel="stylesheet" href='../../css/c1.css'>
        <style>
            *{
                margin: 0 auto;
                padding:0 5px;
            }
            p{
                padding: 5px 10px;
            }
        </style>
        <script src="../../work/jquery-1.12.4.min.js"></script>
        <script>
            jQuery(function ($) {
                $("#btn1",".code").click(function () {
                    $("input:disabled").css({backgroundColor:'red'});
                });

            });
        </script>
    </head>
    <body>
    <div class="title">:disable</div>
    <p>匹配所有不可用元素。</p>
    <div class="title">代码示例</div>
    <div class="code">
                        <pre>
                            &lt;script&gt;
                                jQuery(function ($) {
                                    $("#btn1",).click(function () {
                                        $(<span>"input:disable"</span>).css({backgroundColor:"red"});
                                        //<span>查找所有不可用的input元素</span>
                                    });
                                });
                           &lt;/script&gt;
        &lt;form&gt;
            &lt;input name="email" disabled="disabled" /&gt;&lt;br/&gt;
            &lt;input name="id" /&gt;&lt;br/&gt;
        &lt;/form&gt;
                          &lt;button id="btn1" style="margin: 10px;"&gt;点击查看效果&lt;/button&gt;
                        </pre>
    </div>
    <div class="title">代码示例</div>
    <div class="code">
        <form>
                <input name="email" disabled="disabled" value="禁用"/><br/><br/>
                <input name="id" />
        </form>
        <button id="btn1" style="margin: 10px;width: 120px;height:50px">点击查看效果</button>
    </div>
    </body>
</html>